package cn.math.appmath.biz.impl;

import cn.math.appmath.bean.ActivityBean;
import cn.math.appmath.biz.ActivityBiz;
import cn.math.appmath.dao.ActivityDao;
import cn.math.appmath.entity.Activity;

public class ActivityBizImpl implements ActivityBiz {
	private ActivityDao activityDao;
	
	public boolean delete(int id) {
		return activityDao.delete(id);
	}
	
	public boolean batchDelete(Integer[] ids){
		return activityDao.batchDelete(ids);
	}

	public ActivityBean findAll(int page, String param) {
		if(param.equals("forward")){
			page = page - 2;
		}
		return activityDao.findAll(page);
	}

	public Activity getById(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean save(Activity activity) {
		return activityDao.save(activity);
	}

	public void update(Activity activity) {
		// TODO Auto-generated method stub

	}

	public void setActivityDao(ActivityDao activityDao) {
		this.activityDao = activityDao;
	}

}
